
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>全局模块 · EasyClick开发文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="global-shortcut.html" />
    
    
    <link rel="prev" href="../../funcs.html" />
    

    
        <link rel="shortcut icon" href="/zh-cn/images/ico.png" type="image/x-icon">
    
    
    
    
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/zh-cn/images/ico.png">
    
    
        
    
    
        
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../changelog.html">
            
                <a href="../../changelog.html">
            
                    
                    更改记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../getting-start.html">
            
                <a href="../../getting-start.html">
            
                    
                    开始
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <a target="_blank" href="https://www.bilibili.com/video/bv1W54y1Q7JG">
            
                    
                    视频教程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../download_resources.html">
            
                <a href="../../download_resources.html">
            
                    
                    资源下载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../devtools/dev-tools.html">
            
                <a href="../devtools/dev-tools.html">
            
                    
                    开发工具介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../devtools/dev-tools-install.html">
            
                <a href="../devtools/dev-tools-install.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../devtools/dev-tools-project.html">
            
                <a href="../devtools/dev-tools-project.html">
            
                    
                    工程相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../devtools/dev-tools-device.html">
            
                <a href="../devtools/dev-tools-device.html">
            
                    
                    设备相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../devtools/dev-tools-screen.html">
            
                <a href="../devtools/dev-tools-screen.html">
            
                    
                    屏幕相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../devtools/dev-tools-settings.html">
            
                <a href="../devtools/dev-tools-settings.html">
            
                    
                    设置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../devtools/dev-tools-remote.html">
            
                <a href="../devtools/dev-tools-remote.html">
            
                    
                    远程调试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../funcs.html">
            
                <a href="../../funcs.html">
            
                    
                    功能函数
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.7.1" data-path="global.html">
            
                <a href="global.html">
            
                    
                    全局模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="global-shortcut.html">
            
                <a href="global-shortcut.html">
            
                    
                    全局快捷事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="selector-node.html">
            
                <a href="selector-node.html">
            
                    
                    选择器&节点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../acevent-api.html">
            
                <a href="../acevent-api.html">
            
                    
                    无障碍事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../event-api.html">
            
                <a href="../event-api.html">
            
                    
                    代理事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../image-api.html">
            
                <a href="../image-api.html">
            
                    
                    图色函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../device-api.html">
            
                <a href="../device-api.html">
            
                    
                    设备函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="../file-api.html">
            
                <a href="../file-api.html">
            
                    
                    文件函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.9" data-path="../http-api.html">
            
                <a href="../http-api.html">
            
                    
                    网络函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.10" data-path="../thread-api.html">
            
                <a href="../thread-api.html">
            
                    
                    线程函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.11" data-path="../utils-api.html">
            
                <a href="../utils-api.html">
            
                    
                    常用工具函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.12" data-path="../shell-api.html">
            
                <a href="../shell-api.html">
            
                    
                    Shell命令函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.13" data-path="../sqlite-api.html">
            
                <a href="../sqlite-api.html">
            
                    
                    Sqlite命令函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../ui-custom.html">
            
                <a href="../ui-custom.html">
            
                    
                    原生UI定制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../ui-js-inter.html">
            
                <a href="../ui-js-inter.html">
            
                    
                    JS编写UI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../ui-js-template.html">
            
                <a href="../ui-js-template.html">
            
                    
                    模板式UI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../ui-native-view.html">
            
                <a href="../ui-native-view.html">
            
                    
                    原生UI控件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.3.1" data-path="../ui/linearlayout.html">
            
                <a href="../ui/linearlayout.html">
            
                    
                    LinearLayout线性布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.2" data-path="../ui/framelayout.html">
            
                <a href="../ui/framelayout.html">
            
                    
                    FrameLayout帧布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.3" data-path="../ui/relativelayout.html">
            
                <a href="../ui/relativelayout.html">
            
                    
                    RelativeLayout绝对布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.4" data-path="../ui/scrollview.html">
            
                <a href="../ui/scrollview.html">
            
                    
                    ScrollView滚动框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.5" data-path="../ui/view.html">
            
                <a href="../ui/view.html">
            
                    
                    View视图
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.6" data-path="../ui/button.html">
            
                <a href="../ui/button.html">
            
                    
                    Button按钮
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.7" data-path="../ui/textview.html">
            
                <a href="../ui/textview.html">
            
                    
                    TextView文本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.8" data-path="../ui/edittext.html">
            
                <a href="../ui/edittext.html">
            
                    
                    EditText输入框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.9" data-path="../ui/checkbox.html">
            
                <a href="../ui/checkbox.html">
            
                    
                    CheckBox复选框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.10" data-path="../ui/radiogroup.html">
            
                <a href="../ui/radiogroup.html">
            
                    
                    RadioGroup布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.11" data-path="../ui/radiobutton.html">
            
                <a href="../ui/radiobutton.html">
            
                    
                    RadioButton单选框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.12" data-path="../ui/spinner.html">
            
                <a href="../ui/spinner.html">
            
                    
                    Spinner下拉选择框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.13" data-path="../ui/webview.html">
            
                <a href="../ui/webview.html">
            
                    
                    WebView内嵌浏览器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.14" data-path="../ui/imageview.html">
            
                <a href="../ui/imageview.html">
            
                    
                    ImageView图像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.15" data-path="../ui/cardview.html">
            
                <a href="../ui/cardview.html">
            
                    
                    CardView卡片布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3.16" data-path="../ui/switch.html">
            
                <a href="../ui/switch.html">
            
                    
                    Swtich开关按钮
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../html-ui-custom.html">
            
                <a href="../html-ui-custom.html">
            
                    
                    H5 UI定制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../../hot-update.html">
            
                <a href="../../hot-update.html">
            
                    
                    热更新功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../../zk/zk.html">
            
                <a href="../../zk/zk.html">
            
                    
                    企业版中控接口
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../../zk/zk-ec-state.html">
            
                <a href="../../zk/zk-ec-state.html">
            
                    
                    EC状态控制接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../../zk/zk-node.html">
            
                <a href="../../zk/zk-node.html">
            
                    
                    全局节点模块接口
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.2.1" data-path="../../zk/global/zk-global-log.html">
            
                <a href="../../zk/global/zk-global-log.html">
            
                    
                    日志接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.2" data-path="../../zk/global/zk-node-service.html">
            
                <a href="../../zk/global/zk-node-service.html">
            
                    
                    节点服务接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.3" data-path="../../zk/global/zk-global-click.html">
            
                <a href="../../zk/global/zk-global-click.html">
            
                    
                    点击动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.4" data-path="../../zk/global/zk-global-multitouch.html">
            
                <a href="../../zk/global/zk-global-multitouch.html">
            
                    
                    多点触摸动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.5" data-path="../../zk/global/zk-global-swipe.html">
            
                <a href="../../zk/global/zk-global-swipe.html">
            
                    
                    滑动动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.6" data-path="../../zk/global/zk-global-drag.html">
            
                <a href="../../zk/global/zk-global-drag.html">
            
                    
                    拖动动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.7" data-path="../../zk/global/zk-global-input.html">
            
                <a href="../../zk/global/zk-global-input.html">
            
                    
                    输入动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.8" data-path="../../zk/global/zk-global-node.html">
            
                <a href="../../zk/global/zk-global-node.html">
            
                    
                    节点操作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.9" data-path="../../zk/global/zk-global-systemkey.html">
            
                <a href="../../zk/global/zk-global-systemkey.html">
            
                    
                    系统按键接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.10" data-path="../../zk/global/zk-global-notice.html">
            
                <a href="../../zk/global/zk-global-notice.html">
            
                    
                    通知栏接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2.11" data-path="../../zk/global/zk-global-floatview.html">
            
                <a href="../../zk/global/zk-global-floatview.html">
            
                    
                    悬浮窗接口
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="../../zk/zk-agent.html">
            
                <a href="../../zk/zk-agent.html">
            
                    
                    代理事件模块接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.4" data-path="../../zk/zk-image.html">
            
                <a href="../../zk/zk-image.html">
            
                    
                    图色模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.5" data-path="../../zk/zk-device.md">
            
                <span>
            
                    
                    设备模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.6" data-path="../../zk/zk-file.md">
            
                <span>
            
                    
                    文件模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.7" data-path="../../zk/zk-http.md">
            
                <span>
            
                    
                    网络模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.8" data-path="../../zk/zk-utils.md">
            
                <span>
            
                    
                    常用工具模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.9" data-path="../../zk/zk-shell.html">
            
                <a href="../../zk/zk-shell.html">
            
                    
                    Shell命令模块接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.10" data-path="../../zk/zk-sqlite.md">
            
                <span>
            
                    
                    Sqlite模块接口 - 开发中
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../plugin/plugins.html">
            
                <a href="../plugin/plugins.html">
            
                    
                    插件开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../plugin/javajs.html">
            
                <a href="../plugin/javajs.html">
            
                    
                    Java-JS混合开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../../active-device.html">
            
                <a href="../../active-device.html">
            
                    
                    激活设备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../../question-answer.html">
            
                <a href="../../question-answer.html">
            
                    
                    常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="../../agreement.html">
            
                <a href="../../agreement.html">
            
                    
                    用户协议
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="../../declare.html">
            
                <a href="../../declare.html">
            
                    
                    免责声明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18" >
            
                <span>
            
                    
                    技术交流 QQ群：777164022
            
                </span>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >全局模块</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#&#x8BF4;&#x660E;"><b>1. </b>&#x8BF4;&#x660E;</a></li><li><span class="title-icon "></span><a href="#&#x6A21;&#x5757;&#x52A0;&#x8F7D;"><b>2. </b>&#x6A21;&#x5757;&#x52A0;&#x8F7D;</a></li><ul><li><span class="title-icon "></span><a href="#loaddex-&#x8F7D;&#x5165;dex&#x6216;&#x8005;apk"><b>2.1. </b>loadDex &#x8F7D;&#x5165;dex&#x6216;&#x8005;apk</a></li><li><span class="title-icon "></span><a href="#loadjar-&#x8F7D;&#x5165;jar"><b>2.2. </b>loadJar &#x8F7D;&#x5165;jar</a></li></ul><li><span class="title-icon "></span><a href="#&#x52A8;&#x6001;&#x6267;&#x884C;js"><b>3. </b>&#x52A8;&#x6001;&#x6267;&#x884C;JS</a></li><ul><li><span class="title-icon "></span><a href="#execscript-&#x8F7D;&#x5165;js"><b>3.1. </b>execScript &#x8F7D;&#x5165;JS</a></li></ul><li><span class="title-icon "></span><a href="#&#x91CD;&#x542F;&#x811A;&#x672C;"><b>4. </b>&#x91CD;&#x542F;&#x811A;&#x672C;</a></li><ul><li><span class="title-icon "></span><a href="#restartscript"><b>4.1. </b>restartScript</a></li><li><span class="title-icon "></span><a href="#importclass-&#x5BFC;&#x5165;java&#x7C7B;"><b>4.2. </b>importClass &#x5BFC;&#x5165;JAVA&#x7C7B;</a></li><li><span class="title-icon "></span><a href="#importpackage-&#x5BFC;&#x5165;java&#x5305;"><b>4.3. </b>importPackage &#x5BFC;&#x5165;JAVA&#x5305;</a></li><li><span class="title-icon "></span><a href="#jsonstringify-&#x683C;&#x5F0F;&#x5316;&#x4E3A;json&#x5B57;&#x7B26;&#x4E32;"><b>4.4. </b>JSON.stringify &#x683C;&#x5F0F;&#x5316;&#x4E3A;JSON&#x5B57;&#x7B26;&#x4E32;</a></li><li><span class="title-icon "></span><a href="#jsonparse-&#x8F6C;&#x6362;&#x4E3A;json&#x5BF9;&#x8C61;"><b>4.5. </b>JSON.parse &#x8F6C;&#x6362;&#x4E3A;JSON&#x5BF9;&#x8C61;</a></li></ul><li><span class="title-icon "></span><a href="#&#x76D1;&#x542C;&#x811A;&#x672C;"><b>5. </b>&#x76D1;&#x542C;&#x811A;&#x672C;</a></li><ul><li><span class="title-icon "></span><a href="#setstopcallback-&#x811A;&#x672C;&#x505C;&#x6B62;&#x76D1;&#x542C;"><b>5.1. </b>setStopCallback &#x811A;&#x672C;&#x505C;&#x6B62;&#x76D1;&#x542C;</a></li><li><span class="title-icon "></span><a href="#setexceptioncallback-&#x811A;&#x672C;&#x5F02;&#x5E38;&#x505C;&#x6B62;&#x76D1;&#x542C;"><b>5.2. </b>setExceptionCallback &#x811A;&#x672C;&#x5F02;&#x5E38;&#x505C;&#x6B62;&#x76D1;&#x542C;</a></li></ul><li><span class="title-icon "></span><a href="#&#x9000;&#x51FA;&#x811A;&#x672C;"><b>6. </b>&#x9000;&#x51FA;&#x811A;&#x672C;</a></li><ul><li><span class="title-icon "></span><a href="#exit"><b>6.1. </b>exit</a></li></ul><li><span class="title-icon "></span><a href="#&#x6682;&#x505C;&#x6267;&#x884C;"><b>7. </b>&#x6682;&#x505C;&#x6267;&#x884C;</a></li><ul><li><span class="title-icon "></span><a href="#sleep"><b>7.1. </b>sleep</a></li></ul><li><span class="title-icon "></span><a href="#&#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x65B9;&#x6CD5;"><b>8. </b>&#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x65B9;&#x6CD5;</a></li><ul><li><span class="title-icon "></span><a href="#setsavelog"><b>8.1. </b>setSaveLog</a></li><li><span class="title-icon "></span><a href="#setfloatdisplaylinenumber"><b>8.2. </b>setFloatDisplayLineNumber</a></li><li><span class="title-icon "></span><a href="#toast"><b>8.3. </b>toast</a></li><li><span class="title-icon "></span><a href="#toast1"><b>8.4. </b>toast1</a></li><li><span class="title-icon "></span><a href="#toast2"><b>8.5. </b>toast2</a></li><li><span class="title-icon "></span><a href="#logd"><b>8.6. </b>logd</a></li><li><span class="title-icon "></span><a href="#loge"><b>8.7. </b>loge</a></li><li><span class="title-icon "></span><a href="#logw"><b>8.8. </b>logw</a></li><li><span class="title-icon "></span><a href="#logi"><b>8.9. </b>logi</a></li><li><span class="title-icon "></span><a href="#clearlog"><b>8.10. </b>clearLog</a></li></ul><li><span class="title-icon "></span><a href="#&#x8BFB;&#x53D6;iec&#x5305;&#x8D44;&#x6E90;"><b>9. </b>&#x8BFB;&#x53D6;IEC&#x5305;&#x8D44;&#x6E90;</a></li><ul><li><span class="title-icon "></span><a href="#readresstring"><b>9.1. </b>readResString</a></li><li><span class="title-icon "></span><a href="#readresbitmap"><b>9.2. </b>readResBitmap</a></li><li><span class="title-icon "></span><a href="#readresautoimage"><b>9.3. </b>readResAutoImage</a></li><li><span class="title-icon "></span><a href="#saverestofile"><b>9.4. </b>saveResToFile</a></li></ul><li><span class="title-icon "></span><a href="#ui&#x53C2;&#x6570;&#x8BFB;&#x53D6;"><b>10. </b>UI&#x53C2;&#x6570;&#x8BFB;&#x53D6;</a></li><ul><li><span class="title-icon "></span><a href="#readconfigint"><b>10.1. </b>readConfigInt</a></li><li><span class="title-icon "></span><a href="#readconfigstring"><b>10.2. </b>readConfigString</a></li><li><span class="title-icon "></span><a href="#readconfigdouble"><b>10.3. </b>readConfigDouble</a></li><li><span class="title-icon "></span><a href="#readconfigboolean"><b>10.4. </b>readConfigBoolean</a></li><li><span class="title-icon "></span><a href="#getconfigjson"><b>10.5. </b>getConfigJSON</a></li><li><span class="title-icon "></span><a href="#updateconfig"><b>10.6. </b>updateConfig</a></li></ul><li><span class="title-icon "></span><a href="#ec-&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;"><b>11. </b>EC &#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;</a></li><ul><li><span class="title-icon "></span><a href="#setecsystemconfig"><b>11.1. </b>setECSystemConfig</a></li><li><span class="title-icon "></span><a href="#openecsystemsetting"><b>11.2. </b>openECSystemSetting</a></li></ul><li><span class="title-icon "></span><a href="#&#x8BBE;&#x7F6E;iec&#x6587;&#x4EF6;&#x811A;&#x672C;&#x4E2D;&#x7684;&#x70ED;&#x66F4;&#x65B0;"><b>12. </b>&#x8BBE;&#x7F6E;IEC&#x6587;&#x4EF6;(&#x811A;&#x672C;&#x4E2D;&#x7684;&#x70ED;&#x66F4;&#x65B0;)</a></li><ul><li><span class="title-icon "></span><a href="#setiecpath"><b>12.1. </b>setIECPath</a></li></ul><li><span class="title-icon "></span><a href="#&#x8FD0;&#x884C;&#x6A21;&#x5F0F;"><b>13. </b>&#x8FD0;&#x884C;&#x6A21;&#x5F0F;</a></li><ul><li><span class="title-icon "></span><a href="#isaccmode"><b>13.1. </b>isAccMode</a></li><li><span class="title-icon "></span><a href="#isagentmode"><b>13.2. </b>isAgentMode</a></li><li><span class="title-icon "></span><a href="#isserviceok"><b>13.3. </b>isServiceOk</a></li><li><span class="title-icon "></span><a href="#startenv"><b>13.4. </b>startEnv</a></li></ul></ul></div><a href="#&#x8BF4;&#x660E;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x8BF4;&#x660E;"><a name="&#x8BF4;&#x660E;" class="anchor-navigation-ex-anchor" href="#&#x8BF4;&#x660E;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x8BF4;&#x660E;</h1>
<p>&#x5168;&#x5C40;&#x6A21;&#x5757;&#x662F;&#x6307;&#x76F4;&#x63A5;&#x8C03;&#x7528;&#x65B9;&#x6CD5;&#x5C31;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x7684;&#x6A21;&#x5757;&#xFF0C;&#x65E0;&#x9700;&#x4F7F;&#x7528;&#x524D;&#x7F00;&#x5BF9;&#x8C61;&#x540D;&#x79F0;</p>
<h1 id="&#x6A21;&#x5757;&#x52A0;&#x8F7D;"><a name="&#x6A21;&#x5757;&#x52A0;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x6A21;&#x5757;&#x52A0;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x6A21;&#x5757;&#x52A0;&#x8F7D;</h1>
<h2 id="loaddex-&#x8F7D;&#x5165;dex&#x6216;&#x8005;apk"><a name="loaddex-&#x8F7D;&#x5165;dex&#x6216;&#x8005;apk" class="anchor-navigation-ex-anchor" href="#loaddex-&#x8F7D;&#x5165;dex&#x6216;&#x8005;apk"><i class="fa fa-link" aria-hidden="true"></i></a>2.1. loadDex &#x8F7D;&#x5165;dex&#x6216;&#x8005;apk</h2>
<ul>
<li>&#x8F7D;&#x5165;dex&#x6587;&#x4EF6;</li>
<li>@param path &#x8DEF;&#x5F84;&#xFF0C;&#x52A0;&#x8F7D;&#x987A;&#x5E8F;&#x5206;&#x522B;&#x662F;&#x63D2;&#x4EF6;&#x76EE;&#x5F55;(&#x4F8B;&#x5982; ab.apk)&#x6216;&#x8005;&#x662F;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;(&#x4F8B;&#x5982; /sdcard/ab.apk)&#x52A0;&#x8F7D;</li>
<li>@return true &#x8F7D;&#x5165;&#x6210;&#x529F;&#xFF0C; false&#x8F7D;&#x5165;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
   <span class="hljs-comment">//&#x7C7B;&#x4F3C;&#x8FD9;&#x6837;&#x4F1A;&#x5148;&#x4ECE;IEC&#x6587;&#x4EF6;&#x7684;&#x63D2;&#x4EF6;&#x76EE;&#x5F55;&#x67E5;&#x627E;</span>
   <span class="hljs-comment">//loadDex(&quot;ocr.apk&quot;);</span>
   <span class="hljs-comment">//&#x4E0B;&#x9762;&#x8FD9;&#x4E2A;&#x662F;&#x4ECE;sdcard&#x67E5;&#x627E;</span>
    loadDex(<span class="hljs-string">&quot;/sdcard/a.apk&quot;</span>);
    <span class="hljs-comment">// a.apk&#x4E2D;&#x5B58;&#x5728;com.A&#x8FD9;&#x4E2A;&#x8FD9;&#x4E2A;&#x7C7B;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4F7F;&#x7528;</span>
    <span class="hljs-keyword">var</span> obj = <span class="hljs-keyword">new</span> com.A(); 
}
main();
</code></pre>
</blockquote>
<h2 id="loadjar-&#x8F7D;&#x5165;jar"><a name="loadjar-&#x8F7D;&#x5165;jar" class="anchor-navigation-ex-anchor" href="#loadjar-&#x8F7D;&#x5165;jar"><i class="fa fa-link" aria-hidden="true"></i></a>2.2. loadJar &#x8F7D;&#x5165;jar</h2>
<ul>
<li>&#x8F7D;&#x5165;jar&#x6587;&#x4EF6;</li>
<li>@param path &#x8DEF;&#x5F84;&#xFF0C;&#x52A0;&#x8F7D;&#x987A;&#x5E8F;&#x5206;&#x522B;&#x662F;&#x63D2;&#x4EF6;&#x76EE;&#x5F55;(&#x4F8B;&#x5982; ab.jar)&#x6216;&#x8005;&#x662F;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;(&#x4F8B;&#x5982; /sdcard/ab.jar)&#x52A0;&#x8F7D;</li>
<li>@return true &#x8F7D;&#x5165;&#x6210;&#x529F;&#xFF0C; false&#x8F7D;&#x5165;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    loadJar(<span class="hljs-string">&quot;/sdcard/a.jar&quot;</span>);
    <span class="hljs-comment">// a.jar&#x4E2D;&#x5B58;&#x5728;com.A&#x8FD9;&#x4E2A;&#x8FD9;&#x4E2A;&#x7C7B;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4F7F;&#x7528;</span>
    <span class="hljs-keyword">var</span> obj = <span class="hljs-keyword">new</span> com.A(); 
}
main();
</code></pre>
</blockquote>
<h1 id="&#x52A8;&#x6001;&#x6267;&#x884C;js"><a name="&#x52A8;&#x6001;&#x6267;&#x884C;js" class="anchor-navigation-ex-anchor" href="#&#x52A8;&#x6001;&#x6267;&#x884C;js"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x52A8;&#x6001;&#x6267;&#x884C;JS</h1>
<h2 id="execscript-&#x8F7D;&#x5165;js"><a name="execscript-&#x8F7D;&#x5165;js" class="anchor-navigation-ex-anchor" href="#execscript-&#x8F7D;&#x5165;js"><i class="fa fa-link" aria-hidden="true"></i></a>3.1. execScript &#x8F7D;&#x5165;JS</h2>
<ul>
<li>&#x6267;&#x884C;JS&#x6587;&#x4EF6;&#x6216;&#x8005;&#x5185;&#x5BB9;</li>
<li>@param type 1=&#x6587;&#x4EF6;&#xFF0C;2=&#x76F4;&#x63A5;&#x662F;JS&#x5185;&#x5BB9;</li>
<li>@param content &#x8DEF;&#x5F84;&#x4F8B;&#x5982;/sdcard/a.js&#x6216;&#x8005;js&#x7684;&#x5185;&#x5BB9;</li>
<li>@return &#x5E03;&#x5C14;&#x578B;&#xFF0C;true&#x4EE3;&#x8868;&#x6267;&#x884C;&#x6210;&#x529F;&#xFF0C; false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> d =<span class="hljs-string">&apos;while(true){sleep(1000);logd(111111);}&apos;</span>;

       thread.execAsync(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
           <span class="hljs-comment">//execScript(1,&quot;/sdcard/ad.js&quot;)</span>
           execScript(<span class="hljs-number">2</span>,d);
       });

       <span class="hljs-keyword">while</span>(<span class="hljs-literal">true</span>){
           sleep(<span class="hljs-number">2000</span>);
           loge(<span class="hljs-string">&quot;fsadffsad&quot;</span>)
       }

}
main();
</code></pre>
</blockquote>
<h1 id="&#x91CD;&#x542F;&#x811A;&#x672C;"><a name="&#x91CD;&#x542F;&#x811A;&#x672C;" class="anchor-navigation-ex-anchor" href="#&#x91CD;&#x542F;&#x811A;&#x672C;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x91CD;&#x542F;&#x811A;&#x672C;</h1>
<h2 id="restartscript"><a name="restartscript" class="anchor-navigation-ex-anchor" href="#restartscript"><i class="fa fa-link" aria-hidden="true"></i></a>4.1. restartScript</h2>
<ul>
<li>&#x91CD;&#x542F;&#x811A;&#x672C;&#xFF0C;&#x9002;&#x5408;&#x65E0;&#x9650;&#x5FAA;&#x73AF;&#xFF0C;&#x6216;&#x8005;&#x6709;&#x5F02;&#x5E38;&#x7684;&#x60C5;&#x51B5;&#x53EF;&#x4EE5;&#x4E0B;&#x8F7D;&#x6700;&#x65B0;&#x7684;iec&#x518D;&#x6B21;&#x6267;&#x884C;&#xFF0C;&#x907F;&#x514D;&#x8FDB;&#x5165;UI&#x624D;&#x80FD;&#x70ED;&#x66F4;&#x65B0;,</li>
<li>&#x6CE8;&#x610F;: &#x8BE5;&#x65B9;&#x6CD5;&#x5A01;&#x529B;&#x5DE8;&#x5927;&#xFF0C;&#x8BF7;&#x81EA;&#x884C;&#x63A7;&#x5236;&#x597D;&#x662F;&#x5426;&#x81EA;&#x52A8;&#x91CD;&#x542F;&#xFF0C;&#x5426;&#x5219;&#x53EA;&#x80FD;&#x5F3A;&#x6740;&#x8FDB;&#x7A0B;&#x624D;&#x80FD;&#x505C;&#x6B62;</li>
<li>@param path &#x65B0;&#x7684;IEC&#x8DEF;&#x5F84;&#xFF0C;&#x5982;&#x679C;&#x4E0D;&#x9700;&#x8981;&#x53EF;&#x4EE5;&#x586B;&#x5199;null</li>
<li>@param stopCurrent &#x662F;&#x5426;&#x505C;&#x6B62;&#x5F53;&#x524D;&#x7684;&#x811A;&#x672C;</li>
<li>@param delay &#x5EF6;&#x8FDF;&#x591A;&#x5C11;&#x79D2;&#x540E;&#x6267;&#x884C;</li>
<li>@return bool true &#x4EE3;&#x8868;&#x6210;&#x529F; false &#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
 logd(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x5728;&#x811A;&#x672C;&#x8FD0;&#x884C;&#x7684;&quot;</span>);
setStopCallback(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
     restartScript(<span class="hljs-literal">null</span>,<span class="hljs-literal">false</span>,<span class="hljs-number">3</span>)
 });

 <span class="hljs-comment">//setExceptionCallback(function (){</span>
 <span class="hljs-comment">//    restartScript(null,true,3)</span>
 <span class="hljs-comment">//});</span>
      sleep(<span class="hljs-number">1000</span>);
    logd(<span class="hljs-string">&quot;&#x811A;&#x672C;&#x7ED3;&#x675F;&quot;</span>) 
}
main();
</code></pre>
</blockquote>
<h2 id="importclass-&#x5BFC;&#x5165;java&#x7C7B;"><a name="importclass-&#x5BFC;&#x5165;java&#x7C7B;" class="anchor-navigation-ex-anchor" href="#importclass-&#x5BFC;&#x5165;java&#x7C7B;"><i class="fa fa-link" aria-hidden="true"></i></a>4.2. importClass &#x5BFC;&#x5165;JAVA&#x7C7B;</h2>
<ul>
<li>&#x5BFC;&#x5165;java&#x7684;class&#x7ED9;js&#x7528;</li>
<li>@param clz class&#x7684;&#x540D;&#x79F0;&#x4F8B;&#x5982;: com.A</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    importClass(com.A);
    <span class="hljs-keyword">var</span> obj = <span class="hljs-keyword">new</span> com.A(); 
}
main();
</code></pre>
</blockquote>
<h2 id="importpackage-&#x5BFC;&#x5165;java&#x5305;"><a name="importpackage-&#x5BFC;&#x5165;java&#x5305;" class="anchor-navigation-ex-anchor" href="#importpackage-&#x5BFC;&#x5165;java&#x5305;"><i class="fa fa-link" aria-hidden="true"></i></a>4.3. importPackage &#x5BFC;&#x5165;JAVA&#x5305;</h2>
<ul>
<li>&#x5BFC;&#x5165;java&#x5305;&#x4E0B;&#x9762;&#x6240;&#x6709;&#x7C7B;&#x7ED9;js&#x7528;</li>
<li>@param clz class&#x7684;&#x540D;&#x79F0;&#x4F8B;&#x5982;: com.b</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    importPackage(com.b);
    <span class="hljs-keyword">var</span> obj = <span class="hljs-keyword">new</span> com.b.A(); 
}
main();
</code></pre>
</blockquote>
<h2 id="jsonstringify-&#x683C;&#x5F0F;&#x5316;&#x4E3A;json&#x5B57;&#x7B26;&#x4E32;"><a name="jsonstringify-&#x683C;&#x5F0F;&#x5316;&#x4E3A;json&#x5B57;&#x7B26;&#x4E32;" class="anchor-navigation-ex-anchor" href="#jsonstringify-&#x683C;&#x5F0F;&#x5316;&#x4E3A;json&#x5B57;&#x7B26;&#x4E32;"><i class="fa fa-link" aria-hidden="true"></i></a>4.4. JSON.stringify &#x683C;&#x5F0F;&#x5316;&#x4E3A;JSON&#x5B57;&#x7B26;&#x4E32;</h2>
<ul>
<li>&#x683C;&#x5F0F;&#x5316;&#x5BF9;&#x8C61;&#x4E3A;JSON&#x5B57;&#x7B26;&#x4E32;</li>
<li>@param &#x5BF9;&#x8C61;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> m ={<span class="hljs-string">&quot;sss&quot;</span>:<span class="hljs-string">&quot;a&quot;</span>};
    <span class="hljs-keyword">var</span> d =<span class="hljs-built_in">JSON</span>.stringify(m);
    toast(d);
}
main();
</code></pre>
</blockquote>
<h2 id="jsonparse-&#x8F6C;&#x6362;&#x4E3A;json&#x5BF9;&#x8C61;"><a name="jsonparse-&#x8F6C;&#x6362;&#x4E3A;json&#x5BF9;&#x8C61;" class="anchor-navigation-ex-anchor" href="#jsonparse-&#x8F6C;&#x6362;&#x4E3A;json&#x5BF9;&#x8C61;"><i class="fa fa-link" aria-hidden="true"></i></a>4.5. JSON.parse &#x8F6C;&#x6362;&#x4E3A;JSON&#x5BF9;&#x8C61;</h2>
<ul>
<li>&#x683C;&#x5F0F;&#x5316;JSON&#x5B57;&#x7B26;&#x4E32;&#x4E3A;&#x5BF9;&#x8C61;</li>
<li>@param &#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> m ={<span class="hljs-string">&quot;sss&quot;</span>:<span class="hljs-string">&quot;a&quot;</span>};
    <span class="hljs-keyword">var</span> d =<span class="hljs-built_in">JSON</span>.stringify(m);
    d =<span class="hljs-built_in">JSON</span>.parse(d);
    toast(d);
}
main();
</code></pre>
</blockquote>
<h1 id="&#x76D1;&#x542C;&#x811A;&#x672C;"><a name="&#x76D1;&#x542C;&#x811A;&#x672C;" class="anchor-navigation-ex-anchor" href="#&#x76D1;&#x542C;&#x811A;&#x672C;"><i class="fa fa-link" aria-hidden="true"></i></a>5. &#x76D1;&#x542C;&#x811A;&#x672C;</h1>
<h2 id="setstopcallback-&#x811A;&#x672C;&#x505C;&#x6B62;&#x76D1;&#x542C;"><a name="setstopcallback-&#x811A;&#x672C;&#x505C;&#x6B62;&#x76D1;&#x542C;" class="anchor-navigation-ex-anchor" href="#setstopcallback-&#x811A;&#x672C;&#x505C;&#x6B62;&#x76D1;&#x542C;"><i class="fa fa-link" aria-hidden="true"></i></a>5.1. setStopCallback &#x811A;&#x672C;&#x505C;&#x6B62;&#x76D1;&#x542C;</h2>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    setStopCallback(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>)</span>{
        logd(<span class="hljs-string">&quot;fdsafsad &#x6211;&#x662F;&#x505C;&#x6B62;&#x56DE;&#x8C03;&quot;</span>)
     });
    <span class="hljs-keyword">var</span> result = sleep(<span class="hljs-number">1000</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="setexceptioncallback-&#x811A;&#x672C;&#x5F02;&#x5E38;&#x505C;&#x6B62;&#x76D1;&#x542C;"><a name="setexceptioncallback-&#x811A;&#x672C;&#x5F02;&#x5E38;&#x505C;&#x6B62;&#x76D1;&#x542C;" class="anchor-navigation-ex-anchor" href="#setexceptioncallback-&#x811A;&#x672C;&#x5F02;&#x5E38;&#x505C;&#x6B62;&#x76D1;&#x542C;"><i class="fa fa-link" aria-hidden="true"></i></a>5.2. setExceptionCallback &#x811A;&#x672C;&#x5F02;&#x5E38;&#x505C;&#x6B62;&#x76D1;&#x542C;</h2>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    setExceptionCallback(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">msg</span>)</span>{
        logd(<span class="hljs-string">&quot; &#x5F02;&#x5E38;&#x505C;&#x6B62;&#x6D88;&#x606F;: &quot;</span>+msg)
     });
    <span class="hljs-keyword">var</span> result = sleep(<span class="hljs-number">1000</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
    <span class="hljs-comment">//&#x8FD9;&#x91CC;&#x6709;&#x5F02;&#x5E38;&#x629B;&#x51FA;</span>
    result.length();
}
main();
</code></pre>
</blockquote>
<h1 id="&#x9000;&#x51FA;&#x811A;&#x672C;"><a name="&#x9000;&#x51FA;&#x811A;&#x672C;" class="anchor-navigation-ex-anchor" href="#&#x9000;&#x51FA;&#x811A;&#x672C;"><i class="fa fa-link" aria-hidden="true"></i></a>6. &#x9000;&#x51FA;&#x811A;&#x672C;</h1>
<h2 id="exit"><a name="exit" class="anchor-navigation-ex-anchor" href="#exit"><i class="fa fa-link" aria-hidden="true"></i></a>6.1. exit</h2>
<blockquote>
<pre><code class="lang-javascript">exit();
</code></pre>
</blockquote>
<h1 id="&#x6682;&#x505C;&#x6267;&#x884C;"><a name="&#x6682;&#x505C;&#x6267;&#x884C;" class="anchor-navigation-ex-anchor" href="#&#x6682;&#x505C;&#x6267;&#x884C;"><i class="fa fa-link" aria-hidden="true"></i></a>7. &#x6682;&#x505C;&#x6267;&#x884C;</h1>
<h2 id="sleep"><a name="sleep" class="anchor-navigation-ex-anchor" href="#sleep"><i class="fa fa-link" aria-hidden="true"></i></a>7.1. sleep</h2>
<ul>
<li>&#x4F11;&#x7720;</li>
<li>@param miSecond &#x6BEB;&#x79D2;<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = sleep(<span class="hljs-number">1000</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
</li>
</ul>
<h1 id="&#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x65B9;&#x6CD5;"><a name="&#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>8. &#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x65B9;&#x6CD5;</h1>
<h2 id="setsavelog"><a name="setsavelog" class="anchor-navigation-ex-anchor" href="#setsavelog"><i class="fa fa-link" aria-hidden="true"></i></a>8.1. setSaveLog</h2>
<ul>
<li>&#x8BBE;&#x7F6E;&#x4FDD;&#x5B58;&#x65E5;&#x5FD7;&#x4FE1;&#x606F;&#x5230;&#x6587;&#x4EF6;&#x4E2D;</li>
<li>@param save &#x662F;&#x5426;&#x4FDD;&#x5B58;</li>
<li>@param path &#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x6587;&#x4EF6;&#x5939;</li>
<li>@param size &#x6BCF;&#x4E2A;&#x6587;&#x4EF6;&#x5206;&#x9694;&#x7684;&#x5C3A;&#x5BF8;</li>
<li>@return &#x4FDD;&#x5B58;&#x65E5;&#x5FD7;&#x6587;&#x4EF6;&#x7684;&#x76EE;&#x5F55;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> s = setSaveLog(<span class="hljs-literal">true</span>,<span class="hljs-string">&quot;/sdcard/aaa/&quot;</span>,<span class="hljs-number">1024</span>*<span class="hljs-number">1024</span>);
    logd(<span class="hljs-string">&quot;save dir is:&quot;</span>+s);
}
main();
</code></pre>
</blockquote>
<h2 id="setfloatdisplaylinenumber"><a name="setfloatdisplaylinenumber" class="anchor-navigation-ex-anchor" href="#setfloatdisplaylinenumber"><i class="fa fa-link" aria-hidden="true"></i></a>8.2. setFloatDisplayLineNumber</h2>
<ul>
<li>&#x6253;&#x5370;&#x65E5;&#x5FD7;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x60AC;&#x6D6E;&#x7A97;&#x662F;&#x5426;&#x5C55;&#x793A;&#x884C;&#x53F7;&#xFF0C;&#x6B63;&#x5F0F;&#x53D1;&#x5E03;&#xFF0C;&#x53EF;&#x4EE5;&#x4E0D;&#x5C55;&#x793A;&#x884C;&#x53F7;&#xFF0C;&#x4E0D;&#x5F71;&#x54CD;&#x8C03;&#x8BD5;&#x548C;&#x4FDD;&#x5B58;&#x5728;&#x6587;&#x4EF6;&#x7684;&#x65E5;&#x5FD7;&#x4E2D;</li>
<li>@param ds  true &#x4EE3;&#x8868;&#x663E;&#x793A;&#xFF0C; false &#x4E0D;&#x663E;&#x793A;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
   setFloatDisplayLineNumber(<span class="hljs-literal">true</span>);

}
main();
</code></pre>
</blockquote>
<h2 id="toast"><a name="toast" class="anchor-navigation-ex-anchor" href="#toast"><i class="fa fa-link" aria-hidden="true"></i></a>8.3. toast</h2>
<ul>
<li>&#x663E;&#x793A;Toast&#x6D88;&#x606F;</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    toast(<span class="hljs-string">&quot;msg&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="toast1"><a name="toast1" class="anchor-navigation-ex-anchor" href="#toast1"><i class="fa fa-link" aria-hidden="true"></i></a>8.4. toast1</h2>
<ul>
<li>&#x663E;&#x793A;Toast&#x6D88;&#x606F; (&#x6269;&#x5C55;&#x65B9;&#x6CD5;)</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    toast1(<span class="hljs-string">&quot;msg&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="toast2"><a name="toast2" class="anchor-navigation-ex-anchor" href="#toast2"><i class="fa fa-link" aria-hidden="true"></i></a>8.5. toast2</h2>
<ul>
<li>&#x663E;&#x793A;Toast&#x6D88;&#x606F;(&#x6269;&#x5C55;&#x65B9;&#x6CD5;)</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    toast2(<span class="hljs-string">&quot;msg&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="logd"><a name="logd" class="anchor-navigation-ex-anchor" href="#logd"><i class="fa fa-link" aria-hidden="true"></i></a>8.6. logd</h2>
<ul>
<li>&#x8C03;&#x8BD5;&#x65E5;&#x5FD7;</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    logd(<span class="hljs-string">&quot;msg&quot;</span>);
    <span class="hljs-comment">//&#x53EF;&#x53D8;&#x53C2;&#x6570;&#x5199;&#x6CD5;</span>
    logd(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6D88;&#x606F;{},{}&quot;</span>,<span class="hljs-string">&quot;&#x6D4B;&#x8BD5;1&quot;</span>,<span class="hljs-number">2</span>)
}
main();
</code></pre>
</blockquote>
<h2 id="loge"><a name="loge" class="anchor-navigation-ex-anchor" href="#loge"><i class="fa fa-link" aria-hidden="true"></i></a>8.7. loge</h2>
<ul>
<li>&#x9519;&#x8BEF;&#x65E5;&#x5FD7;</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    loge(<span class="hljs-string">&quot;msg&quot;</span>);
    <span class="hljs-comment">//&#x53EF;&#x53D8;&#x53C2;&#x6570;&#x5199;&#x6CD5;</span>
    loge(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6D88;&#x606F;{},{}&quot;</span>,<span class="hljs-string">&quot;&#x6D4B;&#x8BD5;1&quot;</span>,<span class="hljs-number">2</span>)
}
main();
</code></pre>
</blockquote>
<h2 id="logw"><a name="logw" class="anchor-navigation-ex-anchor" href="#logw"><i class="fa fa-link" aria-hidden="true"></i></a>8.8. logw</h2>
<ul>
<li>&#x8B66;&#x544A;&#x65E5;&#x5FD7;</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    logw(<span class="hljs-string">&quot;msg&quot;</span>);
    <span class="hljs-comment">//&#x53EF;&#x53D8;&#x53C2;&#x6570;&#x5199;&#x6CD5;</span>
    logw(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6D88;&#x606F;{},{}&quot;</span>,<span class="hljs-string">&quot;&#x6D4B;&#x8BD5;1&quot;</span>,<span class="hljs-number">2</span>)
}
main();
</code></pre>
</blockquote>
<h2 id="logi"><a name="logi" class="anchor-navigation-ex-anchor" href="#logi"><i class="fa fa-link" aria-hidden="true"></i></a>8.9. logi</h2>
<ul>
<li>&#x4FE1;&#x606F;&#x65E5;&#x5FD7;</li>
<li>@param msg &#x6D88;&#x606F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    logi(<span class="hljs-string">&quot;msg&quot;</span>);
    <span class="hljs-comment">//&#x53EF;&#x53D8;&#x53C2;&#x6570;&#x5199;&#x6CD5;</span>
    logi(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6D88;&#x606F;{},{}&quot;</span>,<span class="hljs-string">&quot;&#x6D4B;&#x8BD5;1&quot;</span>,<span class="hljs-number">2</span>)
}
main();
</code></pre>
</blockquote>
<h2 id="clearlog"><a name="clearlog" class="anchor-navigation-ex-anchor" href="#clearlog"><i class="fa fa-link" aria-hidden="true"></i></a>8.10. clearLog</h2>
<ul>
<li>&#x6E05;&#x9664;&#x65E5;&#x5FD7;</li>
<li>@param lines &#x6574;&#x578B;&#xFF0C;&#x8981;&#x6E05;&#x9664;&#x7684;&#x884C;&#x6570;&#xFF0C;-1 &#x4EE3;&#x8868;&#x5168;&#x90E8;&#x6E05;&#x9664;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
   showLogWindow()
   sleep(<span class="hljs-number">1000</span>)
   <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; <span class="hljs-number">4</span>; i++) {
          logd(<span class="hljs-string">&quot; &quot;</span>+i);
   }
   sleep(<span class="hljs-number">2000</span>)
    <span class="hljs-comment">//&#x6E05;&#x9664;&#x524D;&#x4E09;&#x884C;</span>
   clearLog(<span class="hljs-number">3</span>)
    <span class="hljs-comment">//&#x6E05;&#x9664;&#x6240;&#x6709;</span>
    clearLog(<span class="hljs-number">-1</span>)
}
main();
</code></pre>
</blockquote>
<h1 id="&#x8BFB;&#x53D6;iec&#x5305;&#x8D44;&#x6E90;"><a name="&#x8BFB;&#x53D6;iec&#x5305;&#x8D44;&#x6E90;" class="anchor-navigation-ex-anchor" href="#&#x8BFB;&#x53D6;iec&#x5305;&#x8D44;&#x6E90;"><i class="fa fa-link" aria-hidden="true"></i></a>9. &#x8BFB;&#x53D6;IEC&#x5305;&#x8D44;&#x6E90;</h1>
<h2 id="readresstring"><a name="readresstring" class="anchor-navigation-ex-anchor" href="#readresstring"><i class="fa fa-link" aria-hidden="true"></i></a>9.1. readResString</h2>
<ul>
<li>&#x8BFB;&#x53D6;res&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x7684;&#x8D44;&#x6E90;&#x6587;&#x4EF6;,&#x5E76;&#x8FD4;&#x56DE;&#x5B57;&#x7B26;&#x4E32;</li>
<li>@param fileName &#x6587;&#x4EF6;&#x540D;&#x79F0;&#xFF0C;&#x4E0D;&#x8981;&#x52A0;res&#x524D;&#x7F00;</li>
<li>@return string &#x5982;&#x679C;&#x662F;null&#x4EE3;&#x8868;&#x6CA1;&#x5185;&#x5BB9;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> testData = readResString(<span class="hljs-string">&quot;a.txt&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="readresbitmap"><a name="readresbitmap" class="anchor-navigation-ex-anchor" href="#readresbitmap"><i class="fa fa-link" aria-hidden="true"></i></a>9.2. readResBitmap</h2>
<ul>
<li>&#x8BFB;&#x53D6;res&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x7684;&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#xFF0C;&#x5E76;&#x8FD4;Bitmap&#x56FE;&#x7247;&#x5BF9;&#x8C61;</li>
<li>@param fileName &#x6587;&#x4EF6;&#x540D;&#x79F0;&#xFF0C;&#x4E0D;&#x8981;&#x52A0;res&#x524D;&#x7F00;</li>
<li>@return string &#x5982;&#x679C;&#x662F;null&#x4EE3;&#x8868;&#x6CA1;&#x5185;&#x5BB9;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> b = readResBitmap(<span class="hljs-string">&quot;a.txt&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="readresautoimage"><a name="readresautoimage" class="anchor-navigation-ex-anchor" href="#readresautoimage"><i class="fa fa-link" aria-hidden="true"></i></a>9.3. readResAutoImage</h2>
<ul>
<li>&#x8BFB;&#x53D6;res&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x7684;&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#xFF0C;&#x5E76;&#x8FD4; AutoImage &#x56FE;&#x7247;&#x5BF9;&#x8C61;</li>
<li>@param fileName &#x6587;&#x4EF6;&#x540D;&#x79F0;&#xFF0C;&#x4E0D;&#x8981;&#x52A0;res&#x524D;&#x7F00;</li>
<li>@return string &#x5982;&#x679C;&#x662F;null&#x4EE3;&#x8868;&#x6CA1;&#x5185;&#x5BB9;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> b = readResAutoImage(<span class="hljs-string">&quot;img/a.png&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="saverestofile"><a name="saverestofile" class="anchor-navigation-ex-anchor" href="#saverestofile"><i class="fa fa-link" aria-hidden="true"></i></a>9.4. saveResToFile</h2>
<ul>
<li>&#x4FDD;&#x5B58;res&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x7684;&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#x5230;&#x6307;&#x5B9A;&#x7684;&#x8DEF;&#x5F84;</li>
<li>@param fileName &#x6587;&#x4EF6;&#x540D;&#x79F0;&#xFF0C;&#x4E0D;&#x8981;&#x52A0;res&#x524D;&#x7F00;</li>
<li>@param path &#x8981;&#x4FDD;&#x5B58;&#x5230;&#x7684;&#x8DEF;&#x5F84;&#x5730;&#x5740;&#xFF0C;&#x4F8B;&#x5982;/sdcard/aa.txt</li>
<li>@return boolean|&#x5E03;&#x5C14;&#x578B; true&#x4EE3;&#x8868;&#x4FDD;&#x5B58;&#x6210;&#x529F;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> b = saveResToFile(<span class="hljs-string">&quot;img/a.png&quot;</span>,<span class="hljs-string">&quot;/sdcard/a.png&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h1 id="ui&#x53C2;&#x6570;&#x8BFB;&#x53D6;"><a name="ui&#x53C2;&#x6570;&#x8BFB;&#x53D6;" class="anchor-navigation-ex-anchor" href="#ui&#x53C2;&#x6570;&#x8BFB;&#x53D6;"><i class="fa fa-link" aria-hidden="true"></i></a>10. UI&#x53C2;&#x6570;&#x8BFB;&#x53D6;</h1>
<h2 id="readconfigint"><a name="readconfigint" class="anchor-navigation-ex-anchor" href="#readconfigint"><i class="fa fa-link" aria-hidden="true"></i></a>10.1. readConfigInt</h2>
<ul>
<li>@description &#x8BFB;&#x53D6;UI&#x754C;&#x9762;&#x4E2D;&#x7684;&#x53C2;&#x6570;,&#x8FD4;&#x56DE;&#x662F;&#x6574;&#x578B;</li>
<li>@param key &#x5728;UI&#x754C;&#x9762;&#x4E2D;&#x914D;&#x7F6E;&#x7684;key</li>
<li>@return &#x6574;&#x578B;&#xFF0C;&#x627E;&#x4E0D;&#x5230;&#x5C31;&#x8FD4;&#x56DE;0</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> testData = readConfigInt(<span class="hljs-string">&quot;test_key&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="readconfigstring"><a name="readconfigstring" class="anchor-navigation-ex-anchor" href="#readconfigstring"><i class="fa fa-link" aria-hidden="true"></i></a>10.2. readConfigString</h2>
<ul>
<li>&#x8BFB;&#x53D6;UI&#x754C;&#x9762;&#x4E2D;&#x7684;&#x53C2;&#x6570;,&#x8FD4;&#x56DE;&#x662F;&#x5B57;&#x7B26;&#x4E32;</li>
<li>@param key &#x5728;UI&#x754C;&#x9762;&#x4E2D;&#x914D;&#x7F6E;&#x7684;key</li>
<li>@return &#x5B57;&#x7B26;&#x4E32; &#x627E;&#x4E0D;&#x5230;&#x5C31;&#x8FD4;&#x56DE;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> testData = readConfigString(<span class="hljs-string">&quot;test_key&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="readconfigdouble"><a name="readconfigdouble" class="anchor-navigation-ex-anchor" href="#readconfigdouble"><i class="fa fa-link" aria-hidden="true"></i></a>10.3. readConfigDouble</h2>
<ul>
<li>&#x8BFB;&#x53D6;UI&#x754C;&#x9762;&#x4E2D;&#x7684;&#x53C2;&#x6570;,&#x8FD4;&#x56DE;&#x662F;Double&#x578B;</li>
<li>@param key &#x5728;UI&#x754C;&#x9762;&#x4E2D;&#x914D;&#x7F6E;&#x7684;key</li>
<li>@return double</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> testData = readConfigDouble(<span class="hljs-string">&quot;test_key&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="readconfigboolean"><a name="readconfigboolean" class="anchor-navigation-ex-anchor" href="#readconfigboolean"><i class="fa fa-link" aria-hidden="true"></i></a>10.4. readConfigBoolean</h2>
<ul>
<li>&#x8BFB;&#x53D6;UI&#x754C;&#x9762;&#x4E2D;&#x7684;&#x53C2;&#x6570;,&#x8FD4;&#x56DE;&#x662F;&#x5E03;&#x5C14;&#x578B;</li>
<li>@param key &#x5728;UI&#x754C;&#x9762;&#x4E2D;&#x914D;&#x7F6E;&#x7684;key</li>
<li>@return true &#x6216;&#x8005; false</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> testData = readConfigDouble(<span class="hljs-string">&quot;test_key&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="getconfigjson"><a name="getconfigjson" class="anchor-navigation-ex-anchor" href="#getconfigjson"><i class="fa fa-link" aria-hidden="true"></i></a>10.5. getConfigJSON</h2>
<ul>
<li>&#x53D6;&#x5F97;&#x914D;&#x7F6E;&#x7684;JSON</li>
<li>@return JSON&#x6570;&#x636E;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> testData = getConfigJSON();
}
main();
</code></pre>
</blockquote>
<h2 id="updateconfig"><a name="updateconfig" class="anchor-navigation-ex-anchor" href="#updateconfig"><i class="fa fa-link" aria-hidden="true"></i></a>10.6. updateConfig</h2>
<ul>
<li>&#x66F4;&#x65B0;&#x914D;&#x7F6E;</li>
<li>@param key &#x952E;</li>
<li>@param value  &#x503C;</li>
<li>@return {boolean} true &#x6210;&#x529F;&#xFF0C;false&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
   updateConfig(<span class="hljs-string">&quot;a&quot;</span>,<span class="hljs-string">&quot;sss&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h1 id="ec-&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;"><a name="ec-&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;" class="anchor-navigation-ex-anchor" href="#ec-&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>11. EC &#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;</h1>
<h2 id="setecsystemconfig"><a name="setecsystemconfig" class="anchor-navigation-ex-anchor" href="#setecsystemconfig"><i class="fa fa-link" aria-hidden="true"></i></a>11.1. setECSystemConfig</h2>
<ul>
<li>&#x8BBE;&#x7F6E;EC&#x7684;&#x7CFB;&#x7EDF;&#x53C2;&#x6570;</li>
<li>@param params  map&#x5F62;&#x5F0F;&#x4F8B;&#x5982; {&quot;running_mode&quot;:&quot;&#x65E0;&#x969C;&#x788D;&quot;},<br></li>
<li>{<br></li>
<li>&quot;running_mode&quot;:&quot;&#x65E0;&#x969C;&#x788D;&quot;,<br></li>
<li>&quot;auto_start_service&quot;:&quot;&#x662F;&quot;,<br></li>
<li>&quot;log_float_window&quot;:&quot;&#x5426;&quot;,<br></li>
<li>&quot;ctrl_float_window&quot;:&quot;&#x5426;&quot;<br></li>
<li>}<br></li>
<li>&#x53C2;&#x6570;&#x89E3;&#x91CA;&#x6709;&#xFF1A;<br></li>
<li>running_mode : &#x8FD0;&#x884C;&#x6A21;&#x5F0F; &#x503C;&#x6709; &#x65E0;&#x969C;&#x788D;&#xFF0C;&#x4EE3;&#x7406;&#x4E24;&#x79CD;</li>
<li>auto_start_service&#xFF1A; &#x5F00;&#x673A;&#x81EA;&#x542F;&#x52A8; &#x503C;&#x6709; &#x662F;&#xFF0C;&#x5426; &#x4E24;&#x79CD;</li>
<li>log_float_window : &#x65E5;&#x5FD7;&#x60AC;&#x6D6E;&#x7A97;&#x5C55;&#x793A; &#x503C;&#x6709; &#x662F;&#xFF0C;&#x5426; &#x4E24;&#x79CD;</li>
<li>ctrl_float_window : &#x542F;&#x505C;&#x63A7;&#x5236;&#x60AC;&#x6D6E;&#x7A97;&#x5C55;&#x793A; &#x503C;&#x6709; &#x662F;&#xFF0C;&#x5426; &#x4E24;&#x79CD;
*</li>
<li>@return &#x5E03;&#x5C14;&#x578B; true &#x662F; false &#x5426;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> m = {
          <span class="hljs-string">&quot;node_service&quot;</span>:<span class="hljs-string">&quot;&#x9700;&#x8981;&quot;</span>,
          <span class="hljs-string">&quot;proxy_service&quot;</span>:<span class="hljs-string">&quot;&#x4E0D;&#x9700;&#x8981;&quot;</span>,
          <span class="hljs-string">&quot;running_mode&quot;</span>:<span class="hljs-string">&quot;&#x65E0;&#x969C;&#x788D;&quot;</span>,
           <span class="hljs-string">&quot;log_float_window&quot;</span>:<span class="hljs-string">&quot;&#x5426;&quot;</span>,
           <span class="hljs-string">&quot;ctrl_float_window&quot;</span>:<span class="hljs-string">&quot;&#x5426;&quot;</span>
      };
    setECSystemConfig(m);

}
main();
</code></pre>
</blockquote>
<h2 id="openecsystemsetting"><a name="openecsystemsetting" class="anchor-navigation-ex-anchor" href="#openecsystemsetting"><i class="fa fa-link" aria-hidden="true"></i></a>11.2. openECSystemSetting</h2>
<ul>
<li>&#x6253;&#x5F00;EC&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;&#x9875;&#x9762;</li>
<li>@return true &#x6210;&#x529F; false &#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = openECSystemSetting();
}
main();
</code></pre>
</blockquote>
<h1 id="&#x8BBE;&#x7F6E;iec&#x6587;&#x4EF6;&#x811A;&#x672C;&#x4E2D;&#x7684;&#x70ED;&#x66F4;&#x65B0;"><a name="&#x8BBE;&#x7F6E;iec&#x6587;&#x4EF6;&#x811A;&#x672C;&#x4E2D;&#x7684;&#x70ED;&#x66F4;&#x65B0;" class="anchor-navigation-ex-anchor" href="#&#x8BBE;&#x7F6E;iec&#x6587;&#x4EF6;&#x811A;&#x672C;&#x4E2D;&#x7684;&#x70ED;&#x66F4;&#x65B0;"><i class="fa fa-link" aria-hidden="true"></i></a>12. &#x8BBE;&#x7F6E;IEC&#x6587;&#x4EF6;(&#x811A;&#x672C;&#x4E2D;&#x7684;&#x70ED;&#x66F4;&#x65B0;)</h1>
<h2 id="setiecpath"><a name="setiecpath" class="anchor-navigation-ex-anchor" href="#setiecpath"><i class="fa fa-link" aria-hidden="true"></i></a>12.1. setIECPath</h2>
<ul>
<li>&#x8BBE;&#x7F6E;&#x8981;&#x6267;&#x884C;&#x7684;IEC&#x6587;&#x4EF6;&#x8DEF;&#x5F84;</li>
<li>@return true &#x6210;&#x529F; false &#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = setIECPath(<span class="hljs-string">&quot;/sdcard/release.iec&quot;</span>);
    logd(<span class="hljs-string">&quot;result : &quot;</span>+result);
    logd(<span class="hljs-string">&quot;&#x5F53;&#x524D;&#x8DEF;&#x5F84; &quot;</span>+getIECPath());
    <span class="hljs-comment">//&#x5F00;&#x542F;&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;&#x51C6;&#x5907;&#x4E0B;&#x4E00;&#x6B21;&#x6267;&#x884C;</span>
    <span class="hljs-keyword">var</span> id2 =startJob(<span class="hljs-string">&quot;task2&quot;</span>,<span class="hljs-string">&quot;2&quot;</span>,<span class="hljs-literal">true</span>);
    logd(<span class="hljs-string">&quot;job id &quot;</span>+id2);

}
main();
</code></pre>
</blockquote>
<h1 id="&#x8FD0;&#x884C;&#x6A21;&#x5F0F;"><a name="&#x8FD0;&#x884C;&#x6A21;&#x5F0F;" class="anchor-navigation-ex-anchor" href="#&#x8FD0;&#x884C;&#x6A21;&#x5F0F;"><i class="fa fa-link" aria-hidden="true"></i></a>13. &#x8FD0;&#x884C;&#x6A21;&#x5F0F;</h1>
<h2 id="isaccmode"><a name="isaccmode" class="anchor-navigation-ex-anchor" href="#isaccmode"><i class="fa fa-link" aria-hidden="true"></i></a>13.1. isAccMode</h2>
<ul>
<li>&#x662F;&#x5426;&#x662F;&#x65E0;&#x969C;&#x788D;&#x6A21;&#x5F0F;</li>
<li>@return true&#x6216;&#x8005;false</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = isAccMode();
}
main();
</code></pre>
</blockquote>
<h2 id="isagentmode"><a name="isagentmode" class="anchor-navigation-ex-anchor" href="#isagentmode"><i class="fa fa-link" aria-hidden="true"></i></a>13.2. isAgentMode</h2>
<ul>
<li>&#x662F;&#x5426;&#x662F;&#x4EE3;&#x7406;&#x6A21;&#x5F0F;</li>
<li>@return true&#x6216;&#x8005;false</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = isAgentMode();
}
main();
</code></pre>
</blockquote>
<h2 id="isserviceok"><a name="isserviceok" class="anchor-navigation-ex-anchor" href="#isserviceok"><i class="fa fa-link" aria-hidden="true"></i></a>13.3. isServiceOk</h2>
<ul>
<li>&#x81EA;&#x52A8;&#x5316;&#x670D;&#x52A1;&#x662F;&#x5426;&#x6B63;&#x5E38;</li>
<li>@return true&#x6216;&#x8005;false</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = isServiceOk();
}
main();
</code></pre>
</blockquote>
<h2 id="startenv"><a name="startenv" class="anchor-navigation-ex-anchor" href="#startenv"><i class="fa fa-link" aria-hidden="true"></i></a>13.4. startEnv</h2>
<ul>
<li>&#x542F;&#x52A8;&#x81EA;&#x52A8;&#x5316;&#x670D;&#x52A1;&#x73AF;&#x5883;</li>
<li>@return true&#x6216;&#x8005;false</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = startEnv();
}
main();
</code></pre>
</blockquote>

<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../../funcs.html" class="navigation navigation-prev " aria-label="Previous page: 功能函数">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="global-shortcut.html" class="navigation navigation-next " aria-label="Next page: 全局快捷事件">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"全局模块","level":"1.7.1","depth":2,"next":{"title":"全局快捷事件","level":"1.7.2","depth":2,"path":"zh-cn/funcs/global/global-shortcut.md","ref":"zh-cn/funcs/global/global-shortcut.md","articles":[]},"previous":{"title":"功能函数","level":"1.7","depth":1,"path":"zh-cn/funcs.md","ref":"zh-cn/funcs.md","articles":[{"title":"全局模块","level":"1.7.1","depth":2,"path":"zh-cn/funcs/global/global.md","ref":"zh-cn/funcs/global/global.md","articles":[]},{"title":"全局快捷事件","level":"1.7.2","depth":2,"path":"zh-cn/funcs/global/global-shortcut.md","ref":"zh-cn/funcs/global/global-shortcut.md","articles":[]},{"title":"选择器&节点","level":"1.7.3","depth":2,"path":"zh-cn/funcs/global/selector-node.md","ref":"zh-cn/funcs/global/selector-node.md","articles":[]},{"title":"无障碍事件","level":"1.7.4","depth":2,"path":"zh-cn/funcs/acevent-api.md","ref":"zh-cn/funcs/acevent-api.md","articles":[]},{"title":"代理事件","level":"1.7.5","depth":2,"path":"zh-cn/funcs/event-api.md","ref":"zh-cn/funcs/event-api.md","articles":[]},{"title":"图色函数","level":"1.7.6","depth":2,"path":"zh-cn/funcs/image-api.md","ref":"zh-cn/funcs/image-api.md","articles":[]},{"title":"设备函数","level":"1.7.7","depth":2,"path":"zh-cn/funcs/device-api.md","ref":"zh-cn/funcs/device-api.md","articles":[]},{"title":"文件函数","level":"1.7.8","depth":2,"path":"zh-cn/funcs/file-api.md","ref":"zh-cn/funcs/file-api.md","articles":[]},{"title":"网络函数","level":"1.7.9","depth":2,"path":"zh-cn/funcs/http-api.md","ref":"zh-cn/funcs/http-api.md","articles":[]},{"title":"线程函数","level":"1.7.10","depth":2,"path":"zh-cn/funcs/thread-api.md","ref":"zh-cn/funcs/thread-api.md","articles":[]},{"title":"常用工具函数","level":"1.7.11","depth":2,"path":"zh-cn/funcs/utils-api.md","ref":"zh-cn/funcs/utils-api.md","articles":[]},{"title":"Shell命令函数","level":"1.7.12","depth":2,"path":"zh-cn/funcs/shell-api.md","ref":"zh-cn/funcs/shell-api.md","articles":[]},{"title":"Sqlite命令函数","level":"1.7.13","depth":2,"path":"zh-cn/funcs/sqlite-api.md","ref":"zh-cn/funcs/sqlite-api.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["chapter-fold","code","copy-code-button","-lunr","-search","search-plus","anchor-navigation-ex","hide-element","favicon-absolute","popup"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"chapter-fold":{},"popup":{},"code":{"copyButtons":true},"favicon-absolute":{"appleTouchIconMore":{},"appleTouchIconPrecomposed152":"/zh-cn/images/ico.png","appleTouchIconPrecomposedMore":{},"favicon":"/zh-cn/images/ico.png"},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"EasyClick开发文档","language":"zh-hans","gitbook":"*","description":"记录EasyClick开发教程和常用的函数"},"file":{"path":"zh-cn/funcs/global/global.md","mtime":"2020-08-24T10:49:09.331Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-09-02T01:03:22.708Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

